import fetch from 'common/src/utils/fetch'
import UTILS from "common/src/utils/utils";
function getScoreLists(data){//开关设置列表
    return fetch ({
        url:`api/scoremanagementservice/scorePrint/queryStudentList?pageNum_=${data.pageNum_}&pageSize_=${data.pageSize_}&grade=${data.condition.grade}&faculty=${data.condition.faculty}&statusProfession=${data.condition.statusProfession}&cultureProfession=${data.condition.cultureProfession}&trainingLevel=${data.condition.trainingLevel}&trainingCategory=${data.condition.trainingCategory}&enrolMethods=${data.condition.enrolMethods}&spcialPlan=${data.condition.spcialPlan}&isOverSeas=${data.condition.isOverSeas}&student=${data.condition.student}&leaveSchool=${data.condition.leaveSchool}`,
        method:'get',
       
    })
}
function exportSumScoreExplain(){
let url='/api/scoremanagementservice/scorePrint/description/export'
window.open(url)
}
function getStudentInfo(id){
    return fetch({
        url:`/api/scoremanagementservice/scoreprint/queryStudentDetail?studentId=${id}`
    })
}
function getChineseScoreList(params){
     return fetch({
         url:`/api/scoremanagementservice/scorePrint/scoresheet/queryDetail?studentId=${params.studentId}&language=${params.language}`,
         method:'get'
     })
}
function getEnglishScoreList(params){
    return fetch({
        url:`/api/scoremanagementservice/scorePrint/scoresheet/queryDetail?studentId=${params.studentId}&language=${params.language}`,
        method:'get'
    })
}
function exportScoreLists(datas){
    let url=`/api/scoremanagementservice/scorePrint/scoresheet/export?studentId=${datas.studentId}&language=${datas.language}`
    window.open(url)
}
function getStudentScoreDetaliMessage(studentId){
    return fetch({
        url:`/api/scoremanagementservice/scorePrint/queryStudentDetail?studentId=${studentId}`
    })
}

function exportBatch(data){
   return fetch({
       url:`/api/scoremanagementservice/scorePrint/scoresheet/exportBatch`,
       method:'post',
       data
   })
}
function exportBatchForKey(key){
    return fetch({
        url:`/api/scoremanagementservice/scorePrint/scoresheet/exportBatchForKey?key=${key}`,
        method:'get'
    })
}

function exportScoreBank(data) {
    return fetch({
        url:`/api/scoremanagementservice/studentScoreBk/exportStudentCreditBank`,
        method:'post',
        data
    })
}
function getExportProsess(key) {
    return fetch({
        url: '/api/scoremanagementservice/studentScoreQuery/exportStudentScoreZipByKey?key=' + key,
        method: 'get'
    });
}
export default{
    getScoreLists,
    exportSumScoreExplain,
    getStudentInfo,
    getChineseScoreList,
    getEnglishScoreList,
    exportScoreLists,
    getStudentScoreDetaliMessage,
    exportBatch,
    exportBatchForKey,
    exportScoreBank,
    getExportProsess
}